<?php

namespace app\models;

use app\components\BaseActiveRecord;
use Yii;

/**
 * This is the model class for table "{{%ii_eyny}}".
 *
 * @property int $id
 * @property string $title
 * @property string $post_url
 * @property string $down_list
 * @property string $files
 * @property int $is_google
 * @property string $streamcherry_url
 * @property string $rapidvideo_url
 * @property string $vidoza_url
 * @property string $openload_url
 * @property int $is_onedrive
 */
class Eyny extends BaseActiveRecord {

    /**
     * @inheritdoc
     */
    public static function tableName() {
        return '{{%ii_eyny}}';
    }

    /**
     * @return \yii\db\Connection the database connection used by this AR class.
     */
    public static function getDb() {
        return Yii::$app->get('db2');
    }

    /**
     * @inheritdoc
     */
    public function rules() {
        return [
            [['is_google', 'is_onedrive'], 'integer'],
            [['title'], 'string', 'max' => 100],
            [['post_url', 'files', 'streamcherry_url', 'rapidvideo_url', 'vidoza_url', 'openload_url'], 'string', 'max' => 200],
            [['down_list'], 'string', 'max' => 1024],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels() {
        return [
            'id' => 'ID',
            'title' => 'Title',
            'post_url' => 'Post Url',
            'down_list' => 'Down List',
            'files' => 'Files',
            'is_google' => 'Is Google',
            'streamcherry_url' => 'Streamcherry Url',
            'rapidvideo_url' => 'Rapidvideo Url',
            'vidoza_url' => 'Vidoza Url',
            'openload_url' => 'Openload Url',
            'is_onedrive' => 'Is Onedrive',
        ];
    }
}
